package com.springsummer.information.green.beans;

/**
 * GenericBeanDefinition xmlreader使用
 */
public class GenericBeanDefinition  extends AbstractBeanDefinition{



    public static final String SCOPE_SINGLETON = "singleton";
    public static final String SCOPE_PROTOTYPE = "prototype";

    protected String beanId;

    protected String beanClassName;

    protected String beanName;

    protected String scope;

    protected String factoryBeanClassName;

    protected String factoryMethodName;

    protected String initMethodName;

    protected String destroyMethodName;

    protected boolean singletonFlag;

    protected boolean prototypeFlag;

    protected MutableConstructorArgValues constructorArgumentValues;

    protected MutablePropertyValues propertyValues;

    protected boolean lazyInit;


    public GenericBeanDefinition() {
        this.constructorArgumentValues=new MutableConstructorArgValues();
        this.propertyValues=new MutablePropertyValues();
        this.lazyInit=false;
    }

    public GenericBeanDefinition(String beanId, String beanClassName, String beanName, String scope, String factoryBeanClassName, String factoryMethodName, String initMethodName, String destroyMethodName, boolean singletonFlag, boolean prototypeFlag) {
        this.beanId = beanId;
        this.beanClassName = beanClassName;
        this.beanName = beanName;
        this.scope = scope;
        this.factoryBeanClassName = factoryBeanClassName;
        this.factoryMethodName = factoryMethodName;
        this.initMethodName = initMethodName;
        this.destroyMethodName = destroyMethodName;
        this.singletonFlag = singletonFlag;
        this.prototypeFlag = prototypeFlag;
        this.constructorArgumentValues=new MutableConstructorArgValues();
        this.propertyValues=new MutablePropertyValues();
        this.lazyInit=false;
    }




    @Override
    public String getBeanId() {
        return beanId;
    }

    public void setBeanId(String beanId) {
        this.beanId = beanId;
    }

    @Override
    public String getBeanClassName() {
        return beanClassName;
    }

    public void setBeanClassName(String beanClassName) {
        this.beanClassName = beanClassName;
    }

    @Override
    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    @Override
    public String getFactoryBeanClassName() {
        return factoryBeanClassName;
    }

    public void setFactoryBeanClassName(String factoryBeanClassName) {
        this.factoryBeanClassName = factoryBeanClassName;
    }

    @Override
    public String getFactoryMethodName() {
        return factoryMethodName;
    }

    public void setFactoryMethodName(String factoryMethodName) {
        this.factoryMethodName = factoryMethodName;
    }

    @Override
    public String getInitMethodName() {
        return initMethodName;
    }

    public void setInitMethodName(String initMethodName) {
        this.initMethodName = initMethodName;
    }

    @Override
    public String getDestroyMethodName() {
        return destroyMethodName;
    }

    public void setDestroyMethodName(String destroyMethodName) {
        this.destroyMethodName = destroyMethodName;
    }

    public boolean isSingletonFlag() {
        return singletonFlag;
    }

    public void setSingletonFlag(boolean singletonFlag) {
        this.singletonFlag = singletonFlag;
    }

    public boolean isPrototypeFlag() {
        return prototypeFlag;
    }

    public void setPrototypeFlag(boolean prototypeFlag) {
        this.prototypeFlag = prototypeFlag;
    }

    @Override
    public boolean isSingleton() {
        return singletonFlag;
    }

    @Override
    public boolean isPrototype() {
        return prototypeFlag;
    }

    @Override
    public MutableConstructorArgValues getConstructorArgumentValues() {
        return constructorArgumentValues;
    }

    public void setConstructorArgumentValues(MutableConstructorArgValues constructorArgumentValues) {
        this.constructorArgumentValues = constructorArgumentValues;
    }

    @Override
    public MutablePropertyValues getPropertyValues() {
        return propertyValues;
    }

    public void setPropertyValues(MutablePropertyValues propertyValues) {
        this.propertyValues = propertyValues;
    }

    @Override
    public boolean isLazyInit() {
        return lazyInit;
    }

    @Override
    public void setLazyInit(boolean lazyInit) {
        this.lazyInit = lazyInit;
    }


}
